package com.yeung.exam;

import java.util.Scanner;

public class 马蜂窝_子数组乘积 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] inputs = sc.nextLine().split(",");
        int data[] = new int[inputs.length];
        for (int i = 0; i < inputs.length; i++) {
            data[i] = Integer.parseInt(inputs[i]);
        }
        int threshold = Integer.valueOf(sc.nextLine());
        //
        int pro = 1;
        int count = 0;
        for (int i = 0; i < data.length; i++) {
            if (data[i] < threshold) count++;
            if (pro < threshold) {
                pro *= data[i];
                count++;
            } else {
                pro = data[i];
            }
        }
        System.out.println(count);
    }
}
